// 数据管理业务接口
//车辆信息
import request from '@/utils/request1'
// 查询车辆信息列表
 function vehicleInfoList(query) {
  return request({
    url: '/logistics/vehicleInfo/list',
    method: 'get',

    params: query
  })
}
// 根据行驶证照片识别行驶证信息
function getQueryVehicleInfo(params) {
    return request({
  
      url: '/logistics/vehicleInfo/queryVehicleInfo',
      method: 'get',
      params
    
    })
  }
  function getQueryDictDetailByCode(code) {
    return request({
  
    //   url: '/logistics/vehicleInfo/queryVehicleInfo/' + fileUrl,
      url:'/system/dict/data/queryDictDetailByCode/'+code,
      method: 'get',
  
    
    })
  }
//   

// 新增车辆信息

export function addVehicleInfo(data) {
    return request({
      url: '/logistics/vehicleInfo/add',
      method: 'post',
      data: data
    })
  }
//   修改车辆信息
  export function updateVehicleInfo(data) {
    return request({
      url: '/logistics/vehicleInfo/update',
      method: 'put',
      data: data
    })
  }
  // 删除车辆
  export function delVehicleInfo(userId) {
    return request({
      url: '/logistics/vehicleInfo/' + userId,
      method: 'delete'
    })
  }
//   获取车辆信息详细信息
  export function getVehicleInfoDetail(roleId) {
    return request({
      url: '/logistics/vehicleInfo/' + roleId,
      method: 'get'
    })
  }
  // 批量修改信息 （目前在禁启用操作使用）
  
  // /logistics/vehicleInfo/editEnabled/1,2,3/1
  export function updateVehicleInfoList(data) {
    return request({
    //   url: '/logistics/vehicleInfo/updateCompanyList',
    url:'/logistics/vehicleInfo/updateVehicleList',
      method: 'post',
      data
    })
  }
//   审核车辆状态
  export function vehicleInfoAudited(data) {
    return request({
      url: '/logistics/vehicleInfo/audited',
      method: 'put',
      data: data
    })
  }
  // 
  export function logisticsVehicleInfoStatus() {
    return request({
      url: '/logistics/vehicleInfo/status',
      method: 'get',
  
    //   params: query
    })
  }
//   
const obj = {
    vehicleInfoList, 
    addVehicleInfo,
    getQueryVehicleInfo,
    updateVehicleInfo,
    delVehicleInfo,
    getVehicleInfoDetail,
    updateVehicleInfoList,
    getQueryDictDetailByCode,
    vehicleInfoAudited,
    logisticsVehicleInfoStatus
    // setVehicleInfoEditEnabled
}
export default obj 